p = re.compile('^(\\s|\\t)*(\\*|0|-)', re.MULTILINE)
rough_desc = p.sub('\n*', rough_desc)
p = re.compile('\\n', re.MULTILINE)
rough_desc = p.sub(' ', rough_desc)
p = re.compile('\\s\\s+', re.MULTILINE)
rough_desc = p.sub('\n', rough_desc)
lines = rough_desc.split('\n')
for i in range(len(lines)):
if lines[i].split() == []:
continue
first_chunk = lines[i].split()[0]
if first_chunk == '*':
p = re.compile('\\*\\s*', re.MULTILINE)
lines[i] = p.sub('', lines[i])
clean_desc += '* %s\n' % lines[i]
continue
clean_desc += '%s\n' % lines[i]
if not clean_desc:
clean_desc = item.comment
else:
msg = _('%s cannot be installed' % item.name)
for it in self.cache._cache.FileList:
if (it.Component != '' or it.Component == item.component or item.architectures) and self.cache.getArch() not in item.architectures:
details.append(_('%s cannot be installed on your computer type (%s). Either the application requires special hardware features or the vendor decided to not support your computer type.') % (item.name, self.cache.getArch()))
break
continue
if item.channel:
details.append(_("%s is available in the third party software channel '%s'. To install it, please click on the checkbox to activate the software channel.") % (item.name, item.channel))